package test.ground.springcache;

import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.concurrent.ExecutorService;

@RestController

public class SpringCacheCon {


    ExecutorService ed;

    @GetMapping("/k1")
    public String getUserById(Long id) {
        return String.valueOf(id);
    }

    @EventListener
    public void onApplicationEvent(WebServerInitializedEvent event) throws IOException {
        System.out.println(111);
    }

    @GetMapping("/sc2")
    public String sc2(Long id) throws Exception {
        return String.valueOf(id);
    }


    public static String g(String x2){
        return "3";
    }


    private String hh(){
        return "2";
    }

}
